<div class="nav" id="contentNav">
    <ul class="hot-nav">
        <li>
            <a class="url_answer_hot {%if data.type=='hot'%} hover {%endif%}"
               href='/answer.html?orderByField=answerCount&type=hot'>热门</a>
        </li>
        <li>
            <a class="url_answer_helper {%if data.type=='helper'%} hover {%endif%}"
               href='/answer.html?orderByField=default&type=helper'>互助问答</a>
        </li>
        <!--<li>
            <a class="url_answer_quick {%if data.type=='quick'%} hover {%endif%}"
            href='/answer.html?orderByField=default&type=quick'>快速提问</a>
        </li>-->
       <!-- <li>
            <a class="url_answer_daren" href='answer_daren.html'>达人问答</a>
        </li>
        <li >
            <a class="url_answer_darenList" href='answer_darenList.html'>达人榜</a>
        </li>-->
    </ul>
</div>
<!--热门下时间筛选-->
{%if data.type=='hot'%}
<div class="nav">
    <div class="hot-nav">
        <a  {% if data.beginDateTime == '' %} class="hover" {% endif %}
            href='/answer.html?orderByField={{data.orderByField}}&type={{data.type}}'>全部</a>
    </div>
    <ul class="clearfix main-ul">
        <li>
            <a  {% if data.beginDateTime == "week" %} class="hover" {% endif %}
            href='/answer.html?orderByField={{data.orderByField}}&type={{data.type}}&beginDateTime=week'>1周内</a>
        </li>
        <li>
            <a {% if data.beginDateTime == "month" %} class="hover" {% endif %}
            href='/answer.html?orderByField={{data.orderByField}}&type={{data.type}}&beginDateTime=month'>1月内</a>
        </li>
        <li>
            <a {% if data.beginDateTime == "quarter" %} class="hover" {% endif %}
            href='/answer.html?orderByField={{data.orderByField}}&type={{data.type}}&beginDateTime=quarter'>3月内</a>
        </li>
        <li >
            <a {% if data.beginDateTime == "halfyear" %} class="hover" {% endif %}
            href='/answer.html?orderByField={{data.orderByField}}&type={{data.type}}&beginDateTime=halfyear'>半年内</a>
        </li>
    </ul>
</div>
{%else%}
<!--主导航-->
<div class="nav category">
    <div class="hot-nav">
        <a {% if data.parentId=='' %} class="hover" {% endif %}
           href='/answer.html?type={{data.type}}'>全部</a>
    </div>
    <ul class="clearfix main-ul">
        {% for item in data.category %}
        <li>
            <a {% if data.parentId == item.id %} class="hover" {% endif %}
               href='/answer.html?type={{data.type}}&parentId={{item.id}}'>{{ item.name }}</a>
        </li>
        {% endfor %}
    </ul>
</div>
<!--子导航-->
<div class="hide" {% if data.parentId %} style="display:block;" {% endif %}>
    <div class="nav sub-nav category">
        {% for item in data.category %}
        <ul class="hide clearfix" {% if data.parentId==item.child[0].parentId %} style="display:block;" {% endif %}>
            <li>
                <a href='/answer.html?type={{data.type}}&parentId={{item.child[0].parentId}}'
                   {% if data.categoryId==data.parentId and (data.parentId == item.child[0].parentId) %} class="hover" {% endif %}>
                    全部
                </a>
            </li>
            {% for child in item.child %}
            <li>
                <a {% if data.categoryId == child.id %} class="hover" {% endif %}
                   href='/answer.html?type={{data.type}}&parentId={{child.parentId}}&categoryId={{child.id}}'>
                    {{ child.name }}
                </a>
            </li>
            {% endfor %}
        </ul>
        {% endfor %}
        <!-- <span class="more">更多</span>-->
    </div>
</div>
{%endif%}
